home *** CD-ROM | disk | FTP | other *** search
/ CU Amiga Super CD-ROM 17 / CU Amiga Magazine's Super CD-ROM 17 (1997)(EMAP Images)(GB)[!][issue 1997-12].iso / CUCD / Programming / DiceSource / lib / alib / timer.a < prev    next >
Text File  |  1994-02-01  |  715b  |  44 lines

  1.  
  2.             ;   autoinit if you ever reference TimerBase
  3.             ;
  4.             ;   (c)Copyright 1990, Matthew Dillon, All Rights Reserved
  5.             ;
  6.             ;   (2.0 timer.device library routines)
  7.  
  8.             xdef    _TimerBase
  9.             xref    __AutoFail0
  10.  
  11. _LVOOpenDevice        equ    -444
  12. _LVOCloseDevice     equ    -450
  13.  
  14.             section autoinit0,code
  15.  
  16.             moveq.l #0,D0
  17.             moveq.l #0,D1
  18.             lea    timeriot(A4),A1
  19.             lea    timername(pc),A0
  20.             jsr    _LVOOpenDevice(A6)
  21.             tst.l    D0
  22.             bne    __AutoFail0
  23.             bra    i10
  24. timername        dc.b    'timer.device',0
  25.             ds.w    0
  26. i10
  27.             section autoexit0,code
  28.  
  29.             move.l    _TimerBase(A4),D0
  30.             beq    l10
  31.             lea    timeriot(A4),A1
  32.             jsr    _LVOCloseDevice(A6)
  33. l10
  34.  
  35.             section libbss,bss
  36.  
  37.             ds.l    0
  38. timeriot        ds.b    20    ; struct timerequest
  39. _TimerBase        ds.b    20    ; io_Device
  40.  
  41.             END
  42.  
  43.  
  44.